/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('cms_site_menu', {
    sm_id: {
      type: DataTypes.CHAR(36),
      allowNull: false,
      primaryKey: true
    },
    sm_parentId: {
      type: DataTypes.CHAR(36),
      allowNull: true
    },
    sm_isParent: {
      type: DataTypes.INTEGER(4),
      allowNull: true,
      defaultValue: '0'
    },
    sm_name: {
      type: DataTypes.STRING(20),
      allowNull: true
    },
    sm_showAddr: {
      type: DataTypes.STRING(10),
      allowNull: true,
      defaultValue: '0'
    },
    sm_sort: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    sm_blank: {
      type: DataTypes.INTEGER(4),
      allowNull: true,
      defaultValue: '0'
    },
    sm_url: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    sm_icon: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    sm_attr: {
      type: DataTypes.STRING(255),
      allowNull: true
    }
  }, {
    tableName: 'cms_site_menu'
  });
};
